/* 
 * File:   NullaryOperator.h
 * Author: Gab'z
 *
 * Created on 29 mai 2012, 20:19
 */

#ifndef NULLARYOPERATOR_H
#define	NULLARYOPERATOR_H

#include "../Operator.h"

namespace calculator {

    class NullaryOperator : public Operator {
    public:
        std::string isExecutable() const;
        virtual NullaryOperator* clone() const = 0;

    protected:
        virtual const Memento* createMemento() const throw (CommandException) = 0;
        virtual void restoreFromMemento(const Memento* memento) const throw (MementoException) = 0;
        NullaryOperator(const std::string name);
        virtual ~NullaryOperator();
        
    private:
        virtual void eval(Stack* stack) const throw (CommandException) = 0;
        NullaryOperator(const NullaryOperator& orig);
    };
}

#endif	/* NULLARYOPERATOR_H */


